package com.waylau.netty.demo.rtmp;

import java.util.logging.Logger;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class RTMPServerHandler extends SimpleChannelInboundHandler<Object> {
	private Logger logger = Logger.getLogger(getClass().getName());

	@Override
	protected void channelRead0(ChannelHandlerContext ctx, Object obj) throws Exception {
		Channel incoming = ctx.channel();
		logger.info(incoming.toString());
		logger.info(obj.toString());
	}

	@Override
	public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
		ctx.flush();
	}

}
